package com.shop.po.dto;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author 'banxia'
 * @version 1.0
 * @description TODO
 * @date 2023/4/1 21:14
 */
@Data
@ToString
public class OrderDetailInfo {


    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "订单表的状态")
    private String state;

    @ApiModelProperty(value = "商品id")
    private Long goodsBaseId;

    //--后来添加
    @ApiModelProperty(value = "商品名称")
    private String goodsBaseName;

    @ApiModelProperty(value = "商品图片")
    private String goodsImagePath;

    @ApiModelProperty(value = "商家ID")
    private Long merchantId;

    @ApiModelProperty(value = "商家店铺名称")
    private String merchantName;

    @ApiModelProperty(value = "购买数量")
    private Integer count;

    @ApiModelProperty(value = "单价金额")
    private Long onePrice;

    @ApiModelProperty(value = "总金额（count*one_price）")
    private Long totalPrice;

    @ApiModelProperty(value = "订单表的ID")
    private Long orderId;


    @ApiModelProperty(value = "创建时间")
    @TableField(fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT-8")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;

    @ApiModelProperty(value = "创建人")
    @TableField(fill = FieldFill.INSERT)
    private Long createUser;

    @ApiModelProperty(value = "修改人")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Long updateUser;
}
